const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,

  configureWebpack: {
    resolve: {
      alias:{
        'assets' :'@/assets',
        'components':'@/components',
        'network':'@/network',
        'utils':'@/utils',
        'views':'@/views',
      }
    }
  },

  publicPath:'/',

  pluginOptions: {
    i18n: {
      locale: undefined,
      fallbackLocale: undefined,
      localeDir: undefined,
      enableInSFC: undefined,
      enableBridge: undefined
    }
  },

  devServer:{
    proxy:{
      '/api':{//表示拦截以/api开头的请求路径
        //target:'http://127.0.0.1:8000',
        target:'https://www.wudao.co',
        changOrigin: true,//是否开启跨域

       /* pathRewrite:{
          '^/api':'/api' //重写api，把api变成空字符，因为我们真正请求的路径是没有api的
        }*/
      }
    }
  }

})

